AmigaActive (1735/2143)

From:Nick Lamburn
Date:27 May 2000 at 12:02:59
Subject:VBCC, PuP and WOS :)

Hello Again!

It never rains but it pours.... ;-)

Well it wasn't going to be long before I got back to programming after
getting the PPC card. Now that I have the said card, I decided to install
VBCC 0.7 for PowerUP and WarpOS. I had been using the 0.7 release of VBCC
for the 68K very successfully for the past year or so, and release 0.6 or
something before that for a year or more. Now that I have a PPC, developing
some useful PPC apps is one of my aims... well it was... ;-)

Firstly, I have been using VBCC PuP with just the standard ANSI C include
files successfully. I have been building some string processing code
(pointers and all that), and compiling PuP ELF files as a result and they
have all worked great. However, my projects require some Amiga functions;
namely from graphics.library, exec.library, intuition.library and
gadtools.library - oh and diskfont.library :-). So as I did for VBCC 68K; I
instaled the 3.1 includes into /vbcc_ppc/machines/amiga/includes// and then
knocked up a quick intuition opening a window, and simple IDCMP CloseWindow
event. The only difference is that the Window structure was made an array
to hold five instances; which is not of interest since that isn't the
problem.

Like I say, I have been compiling my ANSI stuff using: (after executing
'init_vbcc'):

vc +ppc hd1:c_code/hcl/hcl_string.c -o hd1:c_code/exe/hcl-string.elf

That works fine. However if I compile that code with Amiga specifics, using
both PuP and WOS using:

vc +ppc -amiga-align hd1:c_code/native/test.c -o ram:test-win.elf

OR

vc +warpos -amiga-align hd1:c_code/native/test.c -o ram:test-win.exe

I get errors in the linking stage with 'vlink' and it complains about
undefined references to the AmigaOS functions I have used (OpenLibrary,
OpenWindow, WaitPort, CloseWindow, CloseLibrary), and quits. Compiling
with a 68K target (ie: using VBCC 680x0) - the code compiles perfectly with
no errors or warns. And of course the code works 100%

Now can anyone help me here? I re-iterate that I am using the init_vbcc
script; and that it has compiled ANSI non AmigaOS extensions code fine.

All the best,

Nick.



.--------------------------------------------------------------.
| ONLY THE AMIGA MAKES IT POSSIBLE, It has done so since 1985! |
| ------------------------------------------------------------ |
| Trogladite Software - Nick Lamburn | __ __
| http://trogsoft.high5.net oruk_amigan@btinternet.com | / // /�
| ------------------------------------------------------------ | / // /
| So the world may know..... | / // /
`--------------------------------------------------------------'/ // /
__ __ / // /
Want to be a Trogladite Software Developer? \ \\ \/ // /
\ \\/ // /
E-Mail me TODAY! \ / // /

------------------------------------------------------------------------
Missing old school friends? Find them here:
http://click.egroups.com/1/4055/3/_/468125/_/959421975/
------------------------------------------------------------------------

Quote carefully and read all ADMIN:README mails